use crate::src::src::arraylist::{
    arraylist_append, arraylist_clear, arraylist_free, arraylist_index_of, arraylist_insert,
    arraylist_new, arraylist_prepend, arraylist_remove, arraylist_remove_range, arraylist_sort,
};
use crate::src::src::compare_int::{int_compare, int_equal};
use crate::src::struct_and_type::{ArrayList, ArrayListValue, UnitTestFunction};
use crate::src::test::alloc_testing::alloc_test_set_limit;
use crate::src::test::framework::run_tests;

#[no_mangle]
pub static mut variable1_test_arraylist: i32 = 0;
#[no_mangle]
pub static mut variable2_test_arraylist: i32 = 0;
#[no_mangle]
pub static mut variable3_test_arraylist: i32 = 0;
#[no_mangle]
pub static mut variable4_test_arraylist: i32 = 0;
#[no_mangle]
pub extern "C" fn generate_arraylist() -> *mut ArrayList {
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    let mut i: i32 = 0;
    arraylist = arraylist_new(0 as i32 as u32);
    i = 0;
    while i < 4 {
        arraylist_append(
            arraylist,
            (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue,
        );
        arraylist_append(
            arraylist,
            (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue,
        );
        arraylist_append(
            arraylist,
            (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue,
        );
        arraylist_append(
            arraylist,
            (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue,
        );
        i += 1;
        i;
    }
    return arraylist;
}
#[no_mangle]
pub extern "C" fn test_arraylist_new_free() {
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    arraylist = arraylist_new(0 as i32 as u32);
    assert!(!arraylist.is_null());
    arraylist_free(arraylist);
    arraylist = arraylist_new(10 as i32 as u32);
    assert!(!arraylist.is_null());
    arraylist_free(arraylist);
    arraylist_free(core::ptr::null_mut());
    alloc_test_set_limit(0 as i32);
    arraylist = arraylist_new(0 as i32 as u32);
    assert!(arraylist.is_null());
    alloc_test_set_limit(1 as i32);
    arraylist = arraylist_new(100 as i32 as u32);
    assert!(arraylist.is_null());
}
#[no_mangle]
pub extern "C" fn test_arraylist_append() {
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    let mut i: i32 = 0;
    arraylist = arraylist_new(0 as i32 as u32);
    assert!((unsafe { (*arraylist).length }) == 0 as u32);
    assert!(
        arraylist_append(
            arraylist,
            (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 1 as u32);
    assert!(
        arraylist_append(
            arraylist,
            (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 2 as u32);
    assert!(
        arraylist_append(
            arraylist,
            (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 3 as u32);
    assert!(
        arraylist_append(
            arraylist,
            (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 4 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(0 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(1 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(2 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(3 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    i = 0;
    while i < 10000 {
        assert!(arraylist_append(arraylist, core::ptr::null_mut()) != 0);
        i += 1;
        i;
    }
    arraylist_free(arraylist);
    arraylist = arraylist_new(100 as i32 as u32);
    alloc_test_set_limit(0 as i32);
    i = 0;
    while i < 100 {
        assert!(arraylist_append(arraylist, core::ptr::null_mut()) != 0);
        i += 1;
        i;
    }
    assert!((unsafe { (*arraylist).length }) == 100 as u32);
    assert!(arraylist_append(arraylist, core::ptr::null_mut()) == 0);
    assert!((unsafe { (*arraylist).length }) == 100 as u32);
    arraylist_free(arraylist);
}
#[no_mangle]
pub extern "C" fn test_arraylist_prepend() {
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    let mut i: i32 = 0;
    arraylist = arraylist_new(0 as i32 as u32);
    assert!((unsafe { (*arraylist).length }) == 0 as u32);
    assert!(
        arraylist_prepend(
            arraylist,
            (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 1 as u32);
    assert!(
        arraylist_prepend(
            arraylist,
            (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 2 as u32);
    assert!(
        arraylist_prepend(
            arraylist,
            (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 3 as u32);
    assert!(
        arraylist_prepend(
            arraylist,
            (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 4 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(0 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(1 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(2 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(3 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    i = 0;
    while i < 10000 {
        assert!(arraylist_prepend(arraylist, core::ptr::null_mut()) != 0);
        i += 1;
        i;
    }
    arraylist_free(arraylist);
    arraylist = arraylist_new(100 as i32 as u32);
    alloc_test_set_limit(0 as i32);
    i = 0;
    while i < 100 {
        assert!(arraylist_prepend(arraylist, core::ptr::null_mut()) != 0);
        i += 1;
        i;
    }
    assert!((unsafe { (*arraylist).length }) == 100 as u32);
    assert!(arraylist_prepend(arraylist, core::ptr::null_mut()) == 0);
    assert!((unsafe { (*arraylist).length }) == 100 as u32);
    arraylist_free(arraylist);
}
#[no_mangle]
pub extern "C" fn test_arraylist_insert() {
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    let mut i: i32 = 0;
    arraylist = generate_arraylist();
    assert!((unsafe { (*arraylist).length }) == 16 as u32);
    assert!(
        arraylist_insert(
            arraylist, 17 as u32,
            (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue,
        ) == 0
    );
    assert!((unsafe { (*arraylist).length }) == 16 as u32);
    assert!((unsafe { (*arraylist).length }) == 16 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(4 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(5 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(6 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        arraylist_insert(
            arraylist, 5 as u32,
            (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue,
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 17 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(4 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(5 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(6 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(7 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(0 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(1 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(2 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        arraylist_insert(
            arraylist, 0 as u32,
            (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue,
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 18 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(0 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(1 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(2 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(3 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(15 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(16 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(17 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        arraylist_insert(
            arraylist, 18 as u32,
            (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue,
        ) != 0
    );
    assert!((unsafe { (*arraylist).length }) == 19 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(15 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(16 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(17 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(18 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    i = 0;
    while i < 10000 {
        arraylist_insert(
            arraylist, 10 as u32,
            (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue,
        );
        i += 1;
        i;
    }
    arraylist_free(arraylist);
}
#[no_mangle]
pub extern "C" fn test_arraylist_remove_range() {
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    arraylist = generate_arraylist();
    assert!((unsafe { (*arraylist).length }) == 16 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(3 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(4 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(5 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(6 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    arraylist_remove_range(arraylist, 4 as u32, 3 as u32);
    assert!((unsafe { (*arraylist).length }) == 13 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(3 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(4 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(5 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(6 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    arraylist_remove_range(arraylist, 10 as u32, 10 as u32);
    arraylist_remove_range(arraylist, 0 as u32, 16 as u32);
    assert!((unsafe { (*arraylist).length }) == 13 as u32);
    arraylist_free(arraylist);
}
#[no_mangle]
pub extern "C" fn test_arraylist_remove() {
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    arraylist = generate_arraylist();
    assert!((unsafe { (*arraylist).length }) == 16 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(3 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(4 as i32 as isize) })
            == (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(5 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(6 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    arraylist_remove(arraylist, 4 as u32);
    assert!((unsafe { (*arraylist).length }) == 15 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(3 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(4 as i32 as isize) })
            == (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(5 as i32 as isize) })
            == (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue
    );
    assert!(
        (unsafe { *((*arraylist).data).offset(6 as i32 as isize) })
            == (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue
    );
    arraylist_remove(arraylist, 15 as u32);
    assert!((unsafe { (*arraylist).length }) == 15 as u32);
    arraylist_free(arraylist);
}
#[no_mangle]
pub extern "C" fn test_arraylist_index_of() {
    let mut entries: [i32; 10] = [ 89, 4, 23, 42, 16, 15, 8, 99, 50, 30,
    ];
    let mut num_entries: i32 = 0;
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    let mut i: i32 = 0;
    let mut index: i32 = 0;
    let mut val: i32 = 0;
    num_entries = (::core::mem::size_of::<[i32; 10]>() as u64)
        .wrapping_div(::core::mem::size_of::<i32>() as u64) as i32;
    arraylist = arraylist_new(0 as i32 as u32);
    i = 0;
    while i < num_entries {
        arraylist_append(
            arraylist,
            (unsafe { &mut *entries.as_mut_ptr().offset(i as isize) }) as *mut i32
                as ArrayListValue,
        );
        i += 1;
        i;
    }
    i = 0;
    while i < num_entries {
        val = entries[i as usize];
        index = arraylist_index_of(
            arraylist,
            Some(int_equal as unsafe extern "C" fn(*mut (), *mut ()) -> i32),
            &mut val as *mut i32 as ArrayListValue,
        );
        assert!(index == i);
        i += 1;
        i;
    }
    val = 0;
    assert!(
        arraylist_index_of(
            arraylist,
            Some(int_equal as unsafe extern "C" fn(*mut (), *mut ()) -> i32,),
            &mut val as *mut i32 as ArrayListValue,
        ) < 0
    );
    val = 57;
    assert!(
        arraylist_index_of(
            arraylist,
            Some(int_equal as unsafe extern "C" fn(*mut (), *mut ()) -> i32,),
            &mut val as *mut i32 as ArrayListValue,
        ) < 0
    );
    arraylist_free(arraylist);
}
#[no_mangle]
pub extern "C" fn test_arraylist_clear() {
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    arraylist = arraylist_new(0 as i32 as u32);
    arraylist_clear(arraylist);
    assert!((unsafe { (*arraylist).length }) == 0 as u32);
    arraylist_append(
        arraylist,
        (unsafe { &mut variable1_test_arraylist }) as *mut i32 as ArrayListValue,
    );
    arraylist_append(
        arraylist,
        (unsafe { &mut variable2_test_arraylist }) as *mut i32 as ArrayListValue,
    );
    arraylist_append(
        arraylist,
        (unsafe { &mut variable3_test_arraylist }) as *mut i32 as ArrayListValue,
    );
    arraylist_append(
        arraylist,
        (unsafe { &mut variable4_test_arraylist }) as *mut i32 as ArrayListValue,
    );
    arraylist_clear(arraylist);
    assert!((unsafe { (*arraylist).length }) == 0 as u32);
    arraylist_free(arraylist);
}
#[no_mangle]
pub extern "C" fn test_arraylist_sort() {
    let mut arraylist: *mut ArrayList = 0 as *mut ArrayList;
    let mut entries: [i32; 13] = [ 89, 4, 23, 42, 4, 16, 15, 4, 8, 99, 50, 30, 4,
    ];
    let mut sorted: [i32; 13] = [ 4, 4, 4, 4, 8, 15, 16, 23, 30, 42, 50, 89, 99,
    ];
    let mut num_entries: u32 = (::core::mem::size_of::<[i32; 13]>() as u64)
        .wrapping_div(::core::mem::size_of::<i32>() as u64) as u32;
    let mut i: u32 = 0;
    arraylist = arraylist_new(10 as i32 as u32);
    i = 0 as u32;
    while i < num_entries {
        arraylist_prepend(
            arraylist,
            (unsafe { &mut *entries.as_mut_ptr().offset(i as isize) }) as *mut i32
                as ArrayListValue,
        );
        i = i.wrapping_add(1);
        i;
    }
    arraylist_sort(
        arraylist,
        Some(int_compare as unsafe extern "C" fn(*mut (), *mut ()) -> i32),
    );
    assert!((unsafe { (*arraylist).length }) == num_entries);
    i = 0 as u32;
    while i < num_entries {
        let mut value: *mut i32 = 0 as *mut i32;
        value = (unsafe { *((*arraylist).data).offset(i as isize) }) as *mut i32;
        assert!((unsafe { *value }) == sorted[i as usize]);
        i = i.wrapping_add(1);
        i;
    }
    arraylist_free(arraylist);
    arraylist = arraylist_new(5 as i32 as u32);
    arraylist_sort(
        arraylist,
        Some(int_compare as unsafe extern "C" fn(*mut (), *mut ()) -> i32),
    );
    assert!((unsafe { (*arraylist).length }) == 0 as u32);
    arraylist_free(arraylist);
    arraylist = arraylist_new(5 as i32 as u32);
    arraylist_prepend(
        arraylist,
        (unsafe { &mut *entries.as_mut_ptr().offset(0 as i32 as isize) }) as *mut i32
            as ArrayListValue,
    );
    arraylist_sort(
        arraylist,
        Some(int_compare as unsafe extern "C" fn(*mut (), *mut ()) -> i32),
    );
    assert!((unsafe { (*arraylist).length }) == 1 as u32);
    assert!(
        (unsafe { *((*arraylist).data).offset(0 as i32 as isize) })
            == (unsafe { &mut *entries.as_mut_ptr().offset(0 as i32 as isize) }) as *mut i32
                as ArrayListValue
    );
    arraylist_free(arraylist);
}
static mut tests_test_arraylist: [UnitTestFunction; 10] = {
    [
        Some(test_arraylist_new_free as unsafe extern "C" fn() -> ()),
        Some(test_arraylist_append as unsafe extern "C" fn() -> ()),
        Some(test_arraylist_prepend as unsafe extern "C" fn() -> ()),
        Some(test_arraylist_insert as unsafe extern "C" fn() -> ()),
        Some(test_arraylist_remove as unsafe extern "C" fn() -> ()),
        Some(test_arraylist_remove_range as unsafe extern "C" fn() -> ()),
        Some(test_arraylist_index_of as unsafe extern "C" fn() -> ()),
        Some(test_arraylist_clear as unsafe extern "C" fn() -> ()),
        Some(test_arraylist_sort as unsafe extern "C" fn() -> ()),
        None,
    ]
};
fn main_0_test_arraylist(mut _argc: i32, mut _argv: *mut *mut i8) -> i32 {
    run_tests(unsafe { tests_test_arraylist.as_mut_ptr() });
    return 0;
}
pub fn main_test_arraylist() {
    let mut args: Vec<*mut i8> = Vec::new();
    for arg in ::std::env::args() {
        args.push(
            (::std::ffi::CString::new(arg))
                .expect("Failed to convert argument into CString.")
                .into_raw(),
        );
    }
    args.push(::core::ptr::null_mut());
    {
        ::std::process::exit(main_0_test_arraylist(
            (args.len() - 1) as i32,
            args.as_mut_ptr() as *mut *mut i8,
        ) as i32)
    }
}
